package com.sunny.oj.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.sunny.oj.model.entity.Post;
import com.sunny.oj.model.entity.PostComment;
import com.sunny.oj.model.vo.PostCommentVO;
import com.sunny.oj.model.vo.PostVO;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * 帖子服务
 *
 * @author sunshuo
 */
public interface PostCommentService extends IService<PostComment> {

    /**
     * 校验
     *
     * @param postComment
     * @param add
     */
    void validPostComment(PostComment postComment, boolean add);

    /**
     * 获取帖子评论封装(单个id)
     *
     * @param postComment
     * @param request
     * @return
     */
    PostCommentVO getPostCommentVO(PostComment postComment, HttpServletRequest request);

    /**
     * 获取帖子全部评论
     *
     * @param postId
     * @param
     * @return
     */
    List<PostComment> getList(Long postId);

    /**
     * 获取帖子全部评论封装
     *
     * @param list
     * @param
     * @return
     */
    List<PostCommentVO> getPostCommentVOList(List<PostComment> list, HttpServletRequest request);
}
